home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_VB / MLST43.ZIP;1 / FORM1.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-04-17  |  23.0 KB  |  742 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Multi-Column Demo"
  5.    ClientHeight    =   4404
  6.    ClientLeft      =   456
  7.    ClientTop       =   1800
  8.    ClientWidth     =   8592
  9.    FontBold        =   0   'False
  10.    FontItalic      =   -1  'True
  11.    FontName        =   "MS Sans Serif"
  12.    FontSize        =   12
  13.    FontStrikethru  =   0   'False
  14.    FontUnderline   =   0   'False
  15.    Height          =   5148
  16.    Left            =   408
  17.    LinkTopic       =   "Form1"
  18.    ScaleHeight     =   4404
  19.    ScaleWidth      =   8592
  20.    Top             =   1104
  21.    Width           =   8688
  22.    Begin CommandButton Command3 
  23.       Caption         =   "Price"
  24.       Height          =   240
  25.       Left            =   3072
  26.       TabIndex        =   10
  27.       Top             =   2448
  28.       Width           =   1644
  29.    End
  30.    Begin CommandButton Command2 
  31.       Caption         =   "Description"
  32.       Height          =   240
  33.       Left            =   1152
  34.       TabIndex        =   9
  35.       Top             =   2448
  36.       Width           =   1884
  37.    End
  38.    Begin CommandButton Command1 
  39.       Caption         =   "Item"
  40.       Height          =   240
  41.       Left            =   48
  42.       TabIndex        =   8
  43.       Top             =   2448
  44.       Width           =   1068
  45.    End
  46.    Begin MListBox MList4 
  47.       Alignment       =   0  'None
  48.       AllowFocusRect  =   -1  'True
  49.       BackColor       =   &H00C0C0C0&
  50.       BorderStyle     =   1  'Raised
  51.       CheckColor      =   &H00000000&
  52.       CheckStyle      =   0  'Cross Style
  53.       DefPicture      =   FORM1.FRX:0000
  54.       DrawRegions     =   1
  55.       EnableVirtualMsgs=   0   'False
  56.       ExtendedSelect  =   0   'False
  57.       FallColor       =   &H00808080&
  58.       FindDirection   =   0  'Forward
  59.       GridColor       =   &H00000000&
  60.       GridStyle       =   0  'Solid
  61.       Height          =   1524
  62.       HiliteBackColor =   &H00000000&
  63.       HiliteForeColor =   &H00000000&
  64.       HorizontalGrids =   0   'False
  65.       ImageRegion     =   0
  66.       ImageType       =   3  'Aligned Bitmap
  67.       ItemHeight      =   300
  68.       ItemWidth       =   1500
  69.       Left            =   4944
  70.       MaskingColor    =   &H00C0C0C0&
  71.       MultiColumn     =   -1  'True
  72.       MultiSelect     =   0   'False
  73.       RiseColor       =   &H00FFFFFF&
  74.       SelectMode      =   0  'Normal
  75.       SortColumn      =   0
  76.       Sorted          =   0   'False
  77.       StringCompare   =   0  'Case Sensitive
  78.       TabIndex        =   7
  79.       Top             =   2592
  80.       Version         =   "04.20"
  81.       VerticalGrids   =   0   'False
  82.       VirtualMsgZone  =   0
  83.       Width           =   3420
  84.    End
  85.    Begin MListBox MList3 
  86.       Alignment       =   1  'Left
  87.       AllowFocusRect  =   -1  'True
  88.       BackColor       =   &H00C0C0C0&
  89.       BorderStyle     =   2  'Inset
  90.       CheckColor      =   &H00000000&
  91.       CheckStyle      =   0  'Cross Style
  92.       DefPicture      =   FORM1.FRX:011A
  93.       DrawRegions     =   1
  94.       EnableVirtualMsgs=   0   'False
  95.       ExtendedSelect  =   0   'False
  96.       FallColor       =   &H00808080&
  97.       FindDirection   =   0  'Forward
  98.       FontBold        =   0   'False
  99.       FontItalic      =   0   'False
  100.       FontName        =   "MS Sans Serif"
  101.       FontSize        =   9.6
  102.       FontStrikethru  =   0   'False
  103.       FontUnderline   =   0   'False
  104.       GridColor       =   &H00000000&
  105.       GridStyle       =   0  'Solid
  106.       Height          =   1536
  107.       HiliteBackColor =   &H00000000&
  108.       HiliteForeColor =   &H00FFFFFF&
  109.       HorizontalGrids =   0   'False
  110.       ImageRegion     =   0
  111.       ImageType       =   3  'Aligned Bitmap
  112.       ItemHeight      =   500
  113.       ItemWidth       =   780
  114.       Left            =   4944
  115.       MaskingColor    =   &H00C0C0C0&
  116.       MultiColumn     =   0   'False
  117.       MultiSelect     =   0   'False
  118.       RiseColor       =   &H00FFFFFF&
  119.       SelectMode      =   0  'Normal
  120.       SortColumn      =   0
  121.       Sorted          =   0   'False
  122.       StringCompare   =   0  'Case Sensitive
  123.       TabIndex        =   4
  124.       Top             =   480
  125.       Version         =   "04.20"
  126.       VerticalGrids   =   0   'False
  127.       VirtualMsgZone  =   0
  128.       Width           =   3420
  129.    End
  130.    Begin MListBox MList2 
  131.       Alignment       =   0  'None
  132.       AllowFocusRect  =   -1  'True
  133.       BackColor       =   &H00FFFF00&
  134.       BorderStyle     =   0  'Normal
  135.       CheckColor      =   &H00000000&
  136.       CheckStyle      =   1  'Check Mark
  137.       DefPicture      =   FORM1.FRX:0234
  138.       DrawRegions     =   4
  139.       EnableVirtualMsgs=   -1  'True
  140.       ExtendedSelect  =   0   'False
  141.       FallColor       =   &H00808080&
  142.       FindDirection   =   0  'Forward
  143.       FontBold        =   0   'False
  144.       FontItalic      =   -1  'True
  145.       FontName        =   "MS Sans Serif"
  146.       FontSize        =   9.6
  147.       FontStrikethru  =   0   'False
  148.       FontUnderline   =   0   'False
  149.       ForeColor       =   &H00004080&
  150.       GridColor       =   &H00000000&
  151.       GridStyle       =   0  'Solid
  152.       Height          =   1524
  153.       HiliteBackColor =   &H00000000&
  154.       HiliteForeColor =   &H00000000&
  155.       HorizontalGrids =   0   'False
  156.       ImageRegion     =   1
  157.       ImageType       =   0  'None
  158.       ItemHeight      =   300
  159.       ItemWidth       =   780
  160.       Left            =   48
  161.       MaskingColor    =   &H00C0C0C0&
  162.       MultiColumn     =   0   'False
  163.       MultiSelect     =   0   'False
  164.       RiseColor       =   &H00FFFFFF&
  165.       SelectMode      =   0  'Normal
  166.       SortColumn      =   1
  167.       Sorted          =   -1  'True
  168.       StringCompare   =   0  'Case Sensitive
  169.       TabIndex        =   0
  170.       Top             =   2688
  171.       Version         =   "04.20"
  172.       VerticalGrids   =   0   'False
  173.       VirtualMsgZone  =   10
  174.       Width           =   4668
  175.    End
  176.    Begin MListBox MList1 
  177.       Alignment       =   0  'None
  178.       AllowFocusRect  =   -1  'True
  179.       BorderStyle     =   0  'Normal
  180.       CheckColor      =   &H00000000&
  181.       CheckStyle      =   0  'Cross Style
  182.       DragIcon        =   FORM1.FRX:034E
  183.       DrawRegions     =   3
  184.       EnableVirtualMsgs=   0   'False
  185.       ExtendedSelect  =   -1  'True
  186.       FallColor       =   &H00808080&
  187.       FindDirection   =   0  'Forward
  188.       GridColor       =   &H00C0C0C0&
  189.       GridStyle       =   0  'Solid
  190.       Height          =   1752
  191.       HiliteBackColor =   &H00000000&
  192.       HiliteForeColor =   &H00000000&
  193.       HorizontalGrids =   -1  'True
  194.       ImageRegion     =   0
  195.       ImageType       =   0  'None
  196.       ItemHeight      =   195
  197.       ItemWidth       =   780
  198.       Left            =   48
  199.       MaskingColor    =   &H00FFFFFF&
  200.       MultiColumn     =   0   'False
  201.       MultiSelect     =   -1  'True
  202.       RiseColor       =   &H00FFFFFF&
  203.       SelectMode      =   1  'Drag Mode
  204.       SortColumn      =   0
  205.       Sorted          =   -1  'True
  206.       StringCompare   =   0  'Case Sensitive
  207.       TabIndex        =   1
  208.       Top             =   432
  209.       Version         =   "04.20"
  210.       VerticalGrids   =   -1  'True
  211.       VirtualMsgZone  =   0
  212.       Width           =   4668
  213.    End
  214.    Begin Label Label4 
  215.       BorderStyle     =   1  'Fixed Single
  216.       Caption         =   "Multi-Column Style Bitmapped List Box"
  217.       Height          =   252
  218.       Left            =   4944
  219.       TabIndex        =   6
  220.       Top             =   2304
  221.       Width           =   3420
  222.    End
  223.    Begin Label Label3 
  224.       BorderStyle     =   1  'Fixed Single
  225.       Caption         =   "Bitmapped List Box"
  226.       Height          =   252
  227.       Left            =   4944
  228.       TabIndex        =   5
  229.       Top             =   144
  230.       Width           =   3420
  231.    End
  232.    Begin Image Image1 
  233.       Height          =   240
  234.       Left            =   96
  235.       Picture         =   FORM1.FRX:0650
  236.       Top             =   4176
  237.       Visible         =   0   'False
  238.       Width           =   180
  239.    End
  240.    Begin Label Label2 
  241.       BorderStyle     =   1  'Fixed Single
  242.       Caption         =   "Normal List Box - Color, Font, Bitmaps, CheckBoxes"
  243.       Height          =   252
  244.       Left            =   48
  245.       TabIndex        =   3
  246.       Top             =   2208
  247.       Width           =   4668
  248.    End
  249.    Begin Label Label1 
  250.       BorderStyle     =   1  'Fixed Single
  251.       Caption         =   "Multi-Select Sorted List Box/Drag Drop ---->"
  252.       Height          =   252
  253.       Left            =   48
  254.       TabIndex        =   2
  255.       Top             =   144
  256.       Width           =   4668
  257.    End
  258.    Begin Menu mnuMultiSelect 
  259.       Caption         =   "&Multi-Select"
  260.       Begin Menu mnuSelected 
  261.          Caption         =   "&Selected"
  262.       End
  263.       Begin Menu mnuMListCount 
  264.          Caption         =   "&ListCount"
  265.       End
  266.       Begin Menu mnuSelCount 
  267.          Caption         =   "Sel&Count"
  268.       End
  269.       Begin Menu mnuMListIndex 
  270.          Caption         =   "List&Index"
  271.       End
  272.       Begin Menu mnuRange 
  273.          Caption         =   "Select/&Deselect Range"
  274.       End
  275.       Begin Menu mnuFocus 
  276.          Caption         =   "&Focus"
  277.       End
  278.    End
  279.    Begin Menu mnuNormal 
  280.       Caption         =   "&Normal"
  281.       Begin Menu mnuText 
  282.          Caption         =   "&Text"
  283.       End
  284.       Begin Menu mnuListCount 
  285.          Caption         =   "&ListCount"
  286.       End
  287.       Begin Menu mnuListIndex 
  288.          Caption         =   "List&Index"
  289.       End
  290.       Begin Menu mnuRegular 
  291.          Caption         =   "&Regular"
  292.       End
  293.       Begin Menu mnuBitmap 
  294.          Caption         =   "&Bitmap"
  295.       End
  296.       Begin Menu mnuCheckBox 
  297.          Caption         =   "&CheckBox"
  298.       End
  299.       Begin Menu mnuCheckRange 
  300.          Caption         =   "Check/&Uncheck Range"
  301.       End
  302.    End
  303.    Begin Menu mnuBitmapped 
  304.       Caption         =   "&Bitmapped"
  305.       Begin Menu mnuLeft 
  306.          Caption         =   "&Left"
  307.       End
  308.       Begin Menu mnuTop 
  309.          Caption         =   "&Top"
  310.       End
  311.       Begin Menu mnuRight 
  312.          Caption         =   "&Right"
  313.       End
  314.       Begin Menu mnuBottom 
  315.          Caption         =   "&Bottom"
  316.       End
  317.    End
  318.    Begin Menu mnuMisc 
  319.       Caption         =   "M&isc"
  320.       Begin Menu mnuItemData 
  321.          Caption         =   "&ItemData"
  322.       End
  323.       Begin Menu mnuTopIndex 
  324.          Caption         =   "&TopIndex"
  325.       End
  326.       Begin Menu mnuNewIndex 
  327.          Caption         =   "&NewIndex"
  328.       End
  329.       Begin Menu mnuList 
  330.          Caption         =   "&List"
  331.       End
  332.       Begin Menu mnuActiveRegion 
  333.          Caption         =   "&ActiveRegion"
  334.       End
  335.       Begin Menu mnuListRegion 
  336.          Caption         =   "L&istRegion"
  337.       End
  338.       Begin Menu mnuChecked 
  339.          Caption         =   "Checked"
  340.       End
  341.       Begin Menu mnuCheckItem2 
  342.          Caption         =   "Check Item 2"
  343.       End
  344.       Begin Menu mnuUncheckTwo 
  345.          Caption         =   "Uncheck Item Two"
  346.       End
  347.       Begin Menu mnuTest 
  348.          Caption         =   "Test Horz. Scroll Bar"
  349.       End
  350.       Begin Menu mnuRemoveItem 
  351.          Caption         =   "&Remove Item"
  352.       End
  353.       Begin Menu mnuMove 
  354.          Caption         =   "&Move"
  355.       End
  356.    End
  357. Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long
  358. Const LB_SETCOLUMNWIDTH = &H400 + 22
  359. Sub Command1_Click ()
  360.   If MList2.SortColumn <> 1 Then
  361.     MList2.SortColumn = 1
  362.     MList2.Resort = 1
  363.   End If
  364. End Sub
  365. Sub Command2_Click ()
  366.   If MList2.SortColumn <> 2 Then
  367.     MList2.SortColumn = 2
  368.     MList2.Resort = 1
  369.   End If
  370. End Sub
  371. Sub Command3_Click ()
  372.   If MList2.SortColumn <> 3 Then
  373.     MList2.SortColumn = 3
  374.     MList2.Resort = 1
  375.   End If
  376. End Sub
  377. Sub Command4_Click ()
  378.   Debug.Print "MList2 Count: " + MList2.ListCount
  379. End Sub
  380. Sub Command5_Click ()
  381.   Debug.Print "MList2 Selected Text: " + MList2.Text
  382. End Sub
  383. Sub Command7_Click ()
  384.   MList2.TopIndex = 3
  385. End Sub
  386. Sub Command8_Click ()
  387.   Debug.Print "MList2.TopIndex = "; MList2.TopIndex
  388. End Sub
  389. Sub Form_Load ()
  390.   Const DT_RIGHT = 2
  391.   Const DT_VCENTER = 4
  392.   Const DT_SINGLELINE = 32
  393. ' Columns are separated by the Tab character
  394. ' We could set the number of columns ourselves by setting MList1.DrawRegions = ####
  395.   MList1.ItemLength(1) = 750
  396.   MList1.ItemLength(2) = 4000
  397.   MList1.AddItem "Item1" + Chr$(9) + "Information One"
  398.   MList1.AddItem "Item2" + Chr$(9) + "Information Two"
  399.   MList1.AddItem "Item3" + Chr$(9) + "Information Three"
  400.   MList1.AddItem "Item4" + Chr$(9) + "Information Four"
  401.   MList1.AddItem "Item1" + Chr$(9) + "Information One"
  402.   MList1.AddItem "Item2" + Chr$(9) + "Information Two"
  403.   MList1.AddItem "Item3" + Chr$(9) + "Information Three"
  404.   MList1.AddItem "Item4" + Chr$(9) + "Information Four"
  405. ' Print the default flags for item 1
  406.   Debug.Print "Item1 DrawFlags: " + MList1.DrawFlags(1)
  407. ' When you set or change DrawRegions, the default flags are DT_LEFT + DT_VCENTER + DT_SINGLELINE
  408. ' You can set the flags to any legal value used by the Windows API call DrawText
  409. ' Change the dollar column to be right justified instead
  410.   MList2.DrawFlags(3) = DT_RIGHT + DT_VCENTER + DT_SINGLELINE
  411.   Dim I As Integer
  412.   For I = 0 To 4
  413.     MList2.AddItem "Item1" + Chr$(9) + "Information One" + Chr$(9) + "$45.00"
  414.     MList2.AddItem "Item2" + Chr$(9) + "Information Two" + Chr$(9) + "$36.69"
  415.     MList2.AddItem "Item3" + Chr$(9) + "Information Three" + Chr$(9) + "$2234.00"
  416.     MList2.AddItem "Item4" + Chr$(9) + "Information Four" + Chr$(9) + "$4.00"
  417.     MList2.AddItem "Item5" + Chr$(9) + "Information Five" + Chr$(9) + "$0.25"
  418.   Next I
  419.   MList2.ItemLength(1) = 1000
  420.   MList2.ItemLength(2) = 1700
  421.   MList2.ItemLength(3) = 1300
  422.   MList2.ItemForeColor(1) = RGB(255, 255, 255)
  423.   MList2.ItemBkColor(1) = RGB(0, 0, 0)
  424.   MList2.ItemHiliteForeColor(1) = RGB(255, 0, 0)
  425.   MList2.ItemHiliteBackColor(1) = RGB(0, 0, 255)
  426.   MList2.HiliteBackColor = RGB(192, 192, 192)
  427.   MList2.HiliteForeColor = RGB(0, 0, 0)
  428.   MList2.ItemData(0) = 199
  429.   MList2.ItemData(1) = 200
  430.   MList2.ItemData(2) = 201
  431.   MList2.ItemData(3) = 202
  432.   MList2.ItemData(4) = 203
  433.   MList2.ItemData(5) = 204
  434.   MList2.ItemData(6) = 205
  435.   MList2.ItemData(7) = 206
  436.   MList2.ItemData(8) = 207
  437.   MList2.ItemData(9) = 208
  438.   MList2.ItemData(10) = 209
  439.   MList2.ItemData(11) = 210
  440.   MList2.ItemData(12) = 211
  441.   MList2.ItemData(13) = 212
  442.   MList2.ItemData(14) = 213
  443. ' Print the default flags for item 1
  444.   Debug.Print "Item3 DrawFlags: " + MList2.DrawFlags(3)
  445.   Debug.Print "ItemLength(2): "; MList2.ItemLength(2)
  446.   MList3.AddItem "Bitmap string one"
  447.   MList3.AddItem "Bitmap string two"
  448.   MList3.AddItem "Bitmap string three"
  449.   MList3.AddItem "Bitmap string four"
  450.   MList3.AddItem "Bitmap string five"
  451.   MList3.ItemPicture(1) = Image1.Picture
  452.   Dim X As Integer
  453.   For X = 1 To 20
  454.     MList4.AddItem "DOC" + Trim$(Str$(X)) + ".DOC"
  455.   Next X
  456.   MList4.ItemPicture(4) = Image1.Picture
  457.   ' X = SendMessage(MList4.hWnd, LB_SETCOLUMNWIDTH, 100, 0)
  458. End Sub
  459. Sub MList1_Click ()
  460.   ' MsgBox "Multi-Select List Box Click", 0, "MList1"
  461. End Sub
  462. Sub MList1_DblClick ()
  463. '  MsgBox "Multi-Select List Box Double Click", 0, "MList1"
  464. End Sub
  465. Sub MList1_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  466.   If Button And 1 Then MList1.Drag 1
  467. End Sub
  468. Sub MList2_DblClick ()
  469.   If MList2.ImageType = 1 Then
  470.     If MList2.ItemPicture(MList2.ListIndex) <> Image1.Picture Then
  471.       MList2.ItemPicture(MList2.ListIndex) = Image1.Picture
  472.     Else
  473.       MList2.ItemPicture(MList2.ListIndex) = MList2.DefPicture
  474.     End If
  475.   End If
  476. End Sub
  477. Sub MList2_KeyPress (KeyAscii As Integer)
  478.   If MList2.ImageType = 1 Then
  479.     If MList2.ItemPicture(MList2.ListIndex) <> Image1.Picture Then
  480.       MList2.ItemPicture(MList2.ListIndex) = Image1.Picture
  481.     Else
  482.       MList2.ItemPicture(MList2.ListIndex) = MList2.DefPicture
  483.     End If
  484.   Else
  485.     If KeyAscii = 32 Then
  486.       MList2.Checked(MList2.ListIndex) = Not MList2.Checked(MList2.ListIndex)
  487.     End If
  488.   End If
  489. End Sub
  490. Sub MList2_ScrollMessage (Offset As Integer)
  491.   Debug.Print "Scroll Message:" + Str$(Offset)
  492. End Sub
  493. Sub MList2_SelChange ()
  494.   Debug.Print "SelChange on line "; MList2.ListIndex
  495. End Sub
  496. Sub MList2_SelCheck (Index As Integer, CheckState As Integer)
  497.   Dim aString As String
  498.   If CheckState Then
  499.     aString = " On"
  500.   Else
  501.     aString = " Off"
  502.   End If
  503.   Debug.Print "Line "; Index; " is"; aString
  504. End Sub
  505. Sub MList2_VirtualMessage (Message As Integer)
  506.   Dim aString As String
  507.   Select Case Message
  508.     Case 1
  509.       aString = "Add At Bottom"
  510.     Case 2
  511.       aString = "Add At Top"
  512.     Case 3
  513.       aString = "Home"
  514.     Case 4
  515.       aString = "End"
  516.   End Select
  517.   Debug.Print "Scroll Message: "; aString
  518. End Sub
  519. Sub MList3_DragDrop (Source As Control, X As Single, Y As Single)
  520.   MList3.ItemX = X
  521.   MList3.ItemY = Y
  522.   Debug.Print "MList3 has been dropped upon at Item" + Str$(MList3.Item) + "!"
  523. End Sub
  524. Sub MList3_DragOver (Source As Control, X As Single, Y As Single, State As Integer)
  525.   MList3.ItemX = X
  526.   MList3.ItemY = Y
  527.   If MList3.ListIndex <> MList3.Item Then MList3.ListIndex = MList3.Item
  528. End Sub
  529. Sub mnuActiveRegion_Click ()
  530.   MList2.ActiveRegion = 2
  531.   If MList2.ListIndex <> -1 Then
  532.     Dim aString As String
  533.     aString = "MList2.TextRegion = " + MList2.TextRegion
  534.     MsgBox aString, 0, "MList2"
  535.     MList2.TextRegion = "Replace"
  536.     MList2.ActiveRegion = 3
  537.     MList2.TextRegion = "$1.00"
  538.   End If
  539.   aString = "MList2.ListRegion(3) = " + MList2.ListRegion(3)
  540.   MsgBox aString, 0, "MList2"
  541.   MList2.ListRegion(3) = "Replace"
  542.   MList1.ActiveRegion = 1
  543.   If MList1.ListIndex <> -1 Then
  544.     aString = "MList1.TextRegion = " + MList1.TextRegion
  545.     MsgBox aString, 0, "MList1"
  546.     MList1.TextRegion = "Replace"
  547.   End If
  548. End Sub
  549. Sub mnuBitmap_Click ()
  550.   MList2.ItemLength(1) = 300
  551.   MList2.ItemLength(2) = 1000
  552.   MList2.ItemLength(3) = 1700
  553.   MList2.ItemLength(4) = 1300
  554.   MList2.ItemPicture(1) = Image1.Picture
  555.   If MList2.ImageType <> 1 Then
  556.     MList2.ImageType = 1
  557.     MList2.Refresh
  558.     MList2.ItemBkColor(1) = MList2.BackColor
  559.     MList2.ItemForeColor(1) = MList2.ForeColor
  560.   End If
  561. End Sub
  562. Sub mnuBottom_Click ()
  563.   MList3.Alignment = 4
  564.   MList3.Refresh
  565. End Sub
  566. Sub mnuCheckBox_Click ()
  567.   MList2.ItemLength(1) = 300
  568.   MList2.ItemLength(2) = 1000
  569.   MList2.ItemLength(3) = 1700
  570.   MList2.ItemLength(4) = 1300
  571.   If MList2.ImageType <> 2 Then
  572.     MList2.ImageType = 2
  573.     MList2.Refresh
  574.     MList2.ItemBkColor(1) = MList2.BackColor
  575.     MList2.ItemForeColor(1) = MList2.ForeColor
  576.   End If
  577. End Sub
  578. Sub mnuChecked_Click ()
  579.   MList2.Checked(1) = True
  580.   Dim X%
  581.   For X% = 0 To MList2.ListCount - 1
  582.     If MList2.Checked(X%) Then
  583.       Debug.Print "MList2.Checked("; X%; ") = Checked"
  584.     Else
  585.       Debug.Print "MList2.Checked("; X%; ") = Unchecked"
  586.     End If
  587.   Next X%
  588. End Sub
  589. Sub mnuCheckItem2_Click ()
  590.   If MList2.ImageType = 2 Then
  591.     MList2.Checked(2) = True
  592.   End If
  593. End Sub
  594. Sub mnuCheckRange_Click ()
  595.   If MList2.ImageType = 2 Then
  596.     MList2.RangeStart = 0
  597.     MList2.RangeEnd = 3
  598.     If MList2.Checked(0) Then
  599.       MList2.RangeChecked = False
  600.     Else
  601.       MList2.RangeChecked = True
  602.     End If
  603.   End If
  604. End Sub
  605. Sub mnuFocus_Click ()
  606.   MList1.SetFocus
  607. End Sub
  608. Sub mnuItemData_Click ()
  609.   Dim Count As Integer
  610.   Dim X As Integer
  611.   Dim aString As String
  612.   Count = MList2.ListCount
  613.   For X = 0 To Count - 1
  614.     Debug.Print "ItemData" + Str$(X) + ": " + Str$(MList2.ItemData(X))
  615.   Next
  616. End Sub
  617. Sub mnuLeft_Click ()
  618.   MList3.Alignment = 1
  619.   MList3.Refresh
  620. End Sub
  621. Sub mnuList_Click ()
  622.   For I = 0 To MList2.ListCount - 1
  623.     Debug.Print I; " - "; MList2.List(I)
  624.   Next I
  625.   MList2.List(2) = "Rep" + Chr$(9) + "Replacement" + Chr$(9) + "$100.00"
  626. End Sub
  627. Sub mnuListCount_Click ()
  628.   Dim aString As String
  629.   aString = "MList2.ListCount = " + Str$(MList2.ListCount)
  630.   MsgBox aString, 0, "MList2"
  631. End Sub
  632. Sub mnuListIndex_Click ()
  633.   Dim aString As String
  634.   aString = "MList2.ListIndex = " + Str$(MList2.ListIndex)
  635.   MsgBox aString, 0, "MList2"
  636.   MList2.ListIndex = 2
  637. End Sub
  638. Sub mnuListRegion_Click ()
  639.   MList1.ListIndex = 4
  640.   MList1.ActiveRegion = 1
  641.   MList1.ListRegion(4) = "List"
  642.   MList1.ActiveRegion = 2
  643.   MList1.TextRegion = "Change by menu"
  644. End Sub
  645. Sub mnuMListCount_Click ()
  646.   Dim aString As String
  647.   aString = "MList1.ListCount = " + Str$(MList1.ListCount)
  648.   MsgBox aString, 0, "MList1"
  649. End Sub
  650. Sub mnuMListIndex_Click ()
  651.   Dim aString As String
  652.   aString = "MList1.ListIndex = " + Str$(MList1.ListIndex)
  653.   MsgBox aString, 0, "MList1"
  654.   MList1.ListIndex = 2
  655. End Sub
  656. Sub mnuMove_Click ()
  657.   MList1.Move 0, 0
  658. End Sub
  659. Sub mnuMSText_Click ()
  660.   MsgBox MList1.Text, 0, "Text-MList1"
  661. End Sub
  662. Sub mnuNewIndex_Click ()
  663.   MList1.AddItem "Item21" + Chr$(9) + "Information TwoOne"
  664.   Dim aString As String
  665.   aString = "MList1.NewIndex = " + Str$(MList1.NewIndex)
  666.   MsgBox aString, 0, "MList1"
  667. End Sub
  668. Sub mnuRange_Click ()
  669.   MList1.RangeStart = 0
  670.   MList1.RangeEnd = 3
  671.   If MList1.Selected(1) Then
  672.     MList1.RangeSelected = False
  673.   Else
  674.     MList1.RangeSelected = True
  675.   End If
  676. End Sub
  677. Sub mnuRegular_Click ()
  678.   MList2.ItemLength(1) = 1000
  679.   MList2.ItemLength(2) = 1700
  680.   MList2.ItemLength(3) = 1300
  681.   If MList2.ImageType Then
  682.     MList2.ImageType = 0
  683.     MList2.Refresh
  684.     MList2.ItemForeColor(1) = RGB(255, 255, 255)
  685.     MList2.ItemBkColor(1) = RGB(0, 0, 0)
  686.   End If
  687. End Sub
  688. Sub mnuRemoveItem_Click ()
  689.   MList2.RemoveItem 2
  690. End Sub
  691. Sub mnuRight_Click ()
  692.   MList3.Alignment = 3
  693.   MList3.Refresh
  694. End Sub
  695. Sub mnuSelCount_Click ()
  696.   Dim aString As String
  697.   aString = "MList1.SelCount = " + Str$(MList1.SelCount)
  698.   MsgBox aString, 0, "MList1"
  699. End Sub
  700. Sub mnuSelected_Click ()
  701.   Dim Count As Integer
  702.   Dim X As Integer
  703.   Dim aString As String
  704.   Count = MList1.ListCount
  705.   If MList1.SelCount Then
  706.     For X = 0 To Count - 1
  707.       If MList1.Selected(X) Then
  708.         aString = "True"
  709.       Else
  710.         aString = "False"
  711.       End If
  712.       Debug.Print "Item" + Str$(X) + ": " + aString
  713.     Next
  714.   End If
  715. End Sub
  716. Sub mnuTest_Click ()
  717.   MList2.ImageType = 0
  718.   MList2.ItemLength(1) = 1000
  719.   MList2.ItemLength(2) = 1000
  720.   MList2.ItemLength(3) = 1700
  721.   MList2.ItemLength(4) = 1300
  722.   MList2.SetHzScroll = True
  723. End Sub
  724. Sub mnuText_Click ()
  725.   MsgBox MList2.Text, 0, "MList2"
  726. End Sub
  727. Sub mnuTop_Click ()
  728.   MList3.Alignment = 2
  729.   MList3.Refresh
  730. End Sub
  731. Sub mnuTopIndex_Click ()
  732.   MList2.TopIndex = 6
  733.   Dim aString As String
  734.   aString = "MList2.TopIndex = " + Str$(MList2.TopIndex)
  735.   MsgBox aString, 0, "MList2"
  736. End Sub
  737. Sub mnuUncheckTwo_Click ()
  738.   If MList2.ImageType = 2 Then
  739.     MList2.Checked(2) = False
  740.   End If
  741. End Sub
  742.